package cn.topevery.garden.dal.logic;

import cn.topevery.garden.dal.dao.DingtalkAttendanceGroupsWorkDayRelationDao;
import cn.topevery.garden.entity.po.DingtalkAttendanceGroupsWorkDayRelation;
import cn.topevery.garden.entity.query.DingtalkAttendanceGroupsWorkDayRelationQuery;
import cn.topevery.garden.entity.vo.DingtalkAttendanceGroupsWorkDayRelationVO;
import cn.topevery.garden.framework.base.BaseLogic;
import hw.topevery.framework.db.base.BaseEntityDao;
import hw.topevery.framework.db.entity.DataPager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 
 *
 * @author code-generate
 * @date 2021-09-02
 */
@Service
public class DingtalkAttendanceGroupsWorkDayRelationLogic extends BaseLogic<DingtalkAttendanceGroupsWorkDayRelation> {
    @Autowired
    DingtalkAttendanceGroupsWorkDayRelationDao dingtalkAttendanceGroupsWorkDayRelationDao;

    @Override
    public BaseEntityDao<DingtalkAttendanceGroupsWorkDayRelation, Integer> getDao() {
        return dingtalkAttendanceGroupsWorkDayRelationDao;
    }

    

    /**
     * 获取列表
     *
     * @param query
     */
    public DataPager<DingtalkAttendanceGroupsWorkDayRelationVO> listPage(DingtalkAttendanceGroupsWorkDayRelationQuery query) {
        return dingtalkAttendanceGroupsWorkDayRelationDao.listPage(query);
    }

    /**
     * 根据自增id批量删除
     *
     * @param ids
     */
    public void deleteBatchById(String userId,Integer[] ids) {
        dingtalkAttendanceGroupsWorkDayRelationDao.delete(userId, ids);
    }

    /**
     * 根据自增id保存或者更新
     *
     * @param dingtalkAttendanceGroupsWorkDayRelation 实体
     */
    public void saveOrUpdate(String userId, DingtalkAttendanceGroupsWorkDayRelation dingtalkAttendanceGroupsWorkDayRelation){
        dingtalkAttendanceGroupsWorkDayRelationDao.saveOrUpdate(userId,dingtalkAttendanceGroupsWorkDayRelation);
    }

    public void truncate() {
        dingtalkAttendanceGroupsWorkDayRelationDao.truncate();
    }
}
